<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    <div class="container-div">
		<div class="btn-group hidden-xs" id="toolbar" role="group">
			<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="user:appUser:add">
				<i class="fa fa-plus"></i> 新增
			</a>
			<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="user:appUser:remove">
				<i class="fa fa-trash-o"></i> 删除
			</a>
		</div>
			
		<div class="col-sm-12 select-info table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('user:appUser:edit')}]];
        var removeFlag = [[${@permission.hasPermi('user:appUser:remove')}]];
        var prefix = ctx + "user/appUser"

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                modalName: "app用户",
                columns: [{
		            checkbox: true
		        },
				{
					field : 'appUserId', 
					title : 'app用户id' 
				},
				{
					field : 'nickName', 
					title : '用户微信昵称' 
				},
				{
					field : 'headUrl', 
					title : '用户头像（个人上传）' 
				},
				{
					field : 'userNickName', 
					title : '用户私人昵称' 
				},
				{
					field : 'sex', 
					title : '性别 0:女 1：男' 
				},
				{
					field : 'city', 
					title : '所在城市' 
				},
				{
					field : 'province', 
					title : '所在省份' 
				},
				{
					field : 'country', 
					title : '所在国家' 
				},
				{
					field : 'headimgurl', 
					title : '用户头像(微信)' 
				},
				{
					field : 'userToken', 
					title : '用户token' 
				},
				{
					field : 'userPhone', 
					title : '用户电话' 
				},
				{
					field : 'userPassword', 
					title : '用户登陆密码' 
				},
				{
					field : 'topOneId', 
					title : '上2级用户id' 
				},
				{
					field : 'topTwoId', 
					title : '上1级用户id' 
				},
				{
					field : 'referUser', 
					title : '推荐人id:SELF：自己' 
				},
				{
					field : 'userStatus', 
					title : '用户状态NORMAL：正常 LOCKING:锁定' 
				},
				{
					field : 'userLongitude', 
					title : '经度' 
				},
				{
					field : 'userLatitude', 
					title : '纬度' 
				},
				{
					field : 'registrationId', 
					title : '推送通道' 
				},
				{
					field : 'ip', 
					title : '最后ip地址' 
				},
				{
					field : 'deviceId', 
					title : '设备唯一识别码' 
				},
				{
					field : 'deviceName', 
					title : '设备名称' 
				},
				{
					field : 'ctime', 
					title : '创建时间' 
				},
				{
					field : 'effectiveRange', 
					title : '有效范围' 
				},
				{
					field : 'invitationCode', 
					title : '用户邀请码' 
				},
				{
					field : 'alipayNo', 
					title : '用户支付宝账户' 
				},
				{
					field : 'relaName', 
					title : '用户真实姓名 ' 
				},
				{
					field : 'lastLoginTime', 
					title : '' 
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.appUserId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.appUserId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>